home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form Form1
- BackColor = &H0080FF80&
- Caption = "Alpha Phone Numbers"
- ClientHeight = 3135
- ClientLeft = 2340
- ClientTop = 2010
- ClientWidth = 3525
- Height = 3540
- Left = 2280
- LinkTopic = "Form1"
- ScaleHeight = 3135
- ScaleWidth = 3525
- Top = 1665
- Width = 3645
- Begin MaskEdBox mskPhone
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 12
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 420
- Left = 240
- Mask = "####"
- MaxLength = 4
- PromptChar = "_"
- TabIndex = 0
- Top = 1080
- Width = 1215
- End
- Begin ListBox List1
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 12
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 1830
- Left = 1800
- Sorted = -1 'True
- TabIndex = 2
- Top = 840
- Width = 1215
- End
- Begin CommandButton Command1
- Caption = "Fill List"
- Height = 495
- Left = 240
- TabIndex = 1
- Top = 2040
- Width = 1215
- End
- Begin Label Label2
- BackColor = &H00000000&
- BackStyle = 0 'Transparent
- Caption = "Enter the last four digits of your phone number and hit fill list. This will calculate all possible words."
- Height = 735
- Left = 120
- TabIndex = 5
- Top = 0
- Width = 3255
- End
- Begin Label lblPhone
- BackStyle = 0 'Transparent
- Caption = "Phone Number"
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 13.5
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 375
- Left = 240
- TabIndex = 4
- Top = 720
- Width = 1335
- End
- Begin Label Label1
- BackStyle = 0 'Transparent
- Caption = "List Count: 0"
- Height = 255
- Left = 1800
- TabIndex = 3
- Top = 2760
- Width = 1215
- End
- Option Explicit
- Sub Command1_Click ()
- list1.Clear
- ReDim letters(1 To 4, 1 To 4) As String
- Dim mydata As String
- Dim cnt As Integer
- Dim cnt2 As Integer
- mydata = mskPhone.ClipText
- For cnt = 1 To 4
- letters(cnt, 1) = ""
- letters(cnt, 1) = Mid$(mydata, cnt, 1)
- Next cnt
- For cnt2 = 1 To 4
- Select Case letters(cnt2, 1)
- Case "2"
- letters(cnt2, 2) = "A"
- letters(cnt2, 3) = "B"
- letters(cnt2, 4) = "C"
- Case "3"
- letters(cnt2, 2) = "D"
- letters(cnt2, 3) = "E"
- letters(cnt2, 4) = "F"
- Case "4"
- letters(cnt2, 2) = "G"
- letters(cnt2, 3) = "H"
- letters(cnt2, 4) = "I"
- Case "5"
- letters(cnt2, 2) = "J"
- letters(cnt2, 3) = "K"
- letters(cnt2, 4) = "L"
- Case "6"
- letters(cnt2, 2) = "M"
- letters(cnt2, 3) = "N"
- letters(cnt2, 4) = "O"
- Case "7"
- letters(cnt2, 2) = "P"
- letters(cnt2, 3) = "R"
- letters(cnt2, 4) = "S"
- Case "8"
- letters(cnt2, 2) = "T"
- letters(cnt2, 3) = "U"
- letters(cnt2, 4) = "V"
- Case "9"
- letters(cnt2, 2) = "W"
- letters(cnt2, 3) = "X"
- letters(cnt2, 4) = "Y"
- Case Else
- MsgBox "The number " & letters(cnt2, 1) & " does not have any associated letters. There will be a blank space in its place."
- letters(cnt2, 2) = "_"
- letters(cnt2, 3) = "_"
- letters(cnt2, 4) = "_"
- End Select
- Next cnt2
- Dim c1 As Integer
- Dim c2 As Integer
- Dim c3 As Integer
- Dim c4 As Integer
- Dim word As String
- For c1 = 2 To 4
- For c2 = 2 To 4
- For c3 = 2 To 4
- For c4 = 2 To 4
- word = letters(1, c1) & letters(2, c2) & letters(3, c3) & letters(4, c4)
- list1.AddItem word
- Next c4
- Next c3
- Next c2
- Next c1
- label1.Caption = "List count: " & list1.ListCount
- End Sub
-